/*
 * Copyright (c) 2018-2999 九五云信息科技有限公司 All rights reserved.
 *
 * https://www.gz-yami.com/
 *
 */

package com.yami.shop.live.comment.dao;

import cn.binarywang.wx.miniapp.bean.live.WxMaLiveResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yami.shop.bean.param.LiveRoomParam;
import com.yami.shop.common.util.PageAdapter;
import com.yami.shop.common.util.PageParam;
import com.yami.shop.live.comment.dto.LiveRoomDto;
import com.yami.shop.live.comment.model.LiveRoom;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 *
 *
 * @author lhd
 * @date 2020-08-05 08:53:17
 */
public interface LiveRoomMapper extends BaseMapper<LiveRoom> {

    void updateBatchByRoomId(@Param("roomInfos") List<WxMaLiveResult.RoomInfo> roomInfos);

    List<LiveRoomParam> getLivingRoomByProdId(@Param("prodId") Long prodId);

    List<LiveRoomDto> pageRoomAndDetail(@Param("adapter") PageAdapter page, @Param("liveRoom") LiveRoomParam liveRoom);

    long countRoomAndDetail(@Param("liveRoom") LiveRoomParam liveRoom);
}
